package com.project.pudongdata.controller;


import com.project.pudongdata.dto.loginDto;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/login")
public class LoginController {

    @RequestMapping("/login")
    public String login(@RequestBody loginDto loginDto) {

        if ("admin".equals(loginDto.getUsername())&& "123456".equals(loginDto.getPassword()) ){
            return "success";
        }else{
            return "fail";
        }
    }

}
